SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

-- =============================================
-- Author:		Khanh.Le
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[UpdateBooking]
(			
			@BookingID	INT
		   ,@PaymentID	INT
           ,@Phone			VARCHAR(50)
           ,@MobilePhone	VARCHAR(50)
           ,@CardNo			VARCHAR(50)
           ,@TotalPaid		DECIMAL(18,2)
           ,@CheckInDate	DATETIME
           ,@CheckOutDate	DATETIME
           ,@Status			INT
           ,@CardHolder		NVARCHAR(200)
           ,@CardNumber		VARCHAR(50)
           ,@RoomId			INT
           ,@CreatedDate	DATETIME
           ,@ModifiedDate	DATETIME
           ,@NumberOfRooms	INT
           ,@CategoryRoomID	INT
           ,@CustomerID		INT
           ,@HotelID		INT
)
AS
BEGIN
	
   SET NOCOUNT ON;

   UPDATE [dbo].[Bookings]
   SET [PaymentID] = @PaymentID
      ,[Phone] = @Phone
      ,[MobilePhone] = @MobilePhone
      ,[CardNo] = @CardNo
      ,[TotalPaid] = @TotalPaid
      ,[CheckInDate] = @CheckInDate
      ,[CheckOutDate] = @CheckOutDate
      ,[Status] = @Status
      ,[CardHolder] = @CardHolder
      ,[CardNumber] = @CardNumber
      ,[RoomId] = @RoomId
      ,[CreatedDate] = @CreatedDate
      ,[ModifiedDate] = @ModifiedDate
      ,[NumberOfRooms] = @NumberOfRooms
      ,[CategoryRoomID] = @CategoryRoomID
      ,[CustomerID] = @CustomerID
      ,[HotelID] = @HotelID
 WHERE ID = @BookingID


END
GO
